﻿#include "mylistwidget.h"

myListWidget::myListWidget(QWidget *parent)
{
    this->setIconSize(QSize(50,50));
    this->setMouseTracking(true);
    this->setDragEnabled(true);
}

void myListWidget::mouseReleaseEvent(QMouseEvent *event)
{
    index = this->currentItem()->toolTip().toInt();
    QPoint pos =event->pos();
    if(!this->rect().contains(pos)){
        emit drop(index,mapToParent(pos));

    }
}
